//
//  GTMediator.h
//  SampleApp2
//
//  Created by GXHC on 2023/6/29.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

//protocol
@protocol GTDetailViewControlProtocol <NSObject>

@required
- (__kindof UIViewController *)detailViewControllerWithUrl:(NSString *)detailUrl;

@end



@interface GTMediator : NSObject
//target action
+ (__kindof UIViewController *)detailViewControllerWithUrl:(NSString *)detailUrl;

//url scheme
typedef void (^GTMediatorProcessBlock)(NSDictionary *params);
+ (void)registerScheme:(NSString *)scheme processBlock:(GTMediatorProcessBlock)processBlock;
+ (void)openUrl:(NSString *)url params:(NSDictionary *)params;

//protocol
+(void) registerProtocol:(Protocol *)proto cls:(Class)cls;
+(Class) classForProtocol:(Protocol *)proto;
@end

NS_ASSUME_NONNULL_END
